import requests
url = 'https://www.baidu.com/'
headers = {
    'Cookie':'PSTM=1696508138; BAIDUID=0052DE9025A416C4044B4C1E1CC24C94:FG=1; BIDUPSID=64AFCD6169FB50027BB7431896B83B50; BD_UPN=12314753; BA_HECTOR=a1002lag25202k0g0424018t1ihta7a1o; BAIDUID_BFESS=0052DE9025A416C4044B4C1E1CC24C94:FG=1; ZFY=Rcv3nJPyOr:AJBBJJ8mEKJyXi:BVAjMMOkJbm9nN:ARFiY:C; BDORZ=B490B5EBF6F3CD402E515D22BCDA1598',
    'Host':'www.baidu.com',
    'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36'
}
response = requests.get(url,headers = headers)
# cookie 参数获取数据，需要使用推导式处理cookie信息
print(response.content.decode())